IndenterT.isTrigger

This function is used to determine if a key pressed should cause the indenter to automatically indent.

The default implementation of this virtual method will check to see if @keyval is [const@Gdk.KEY_Return] or [const@Gdk.KEY_KP_Enter] and @state does not have %GDK_SHIFT_MASK set. This is to allow the user to avoid indentation when Shift+Return is pressed. Other indenters may want to copy this behavior to provide a consistent experience to users.

template IndenterT(TStruct)
bool
isTrigger

Parameters

view View

a #GtkSourceView

location TextIter

the location where @ch is to be inserted

state GdkModifierType

modifier state for the insertion

keyval uint

the keyval pressed such as [const@Gdk.KEY_Return]

Return Value

Type: bool

%TRUE if indentation should be automatically triggered; otherwise %FALSE and no indentation will be performed.

Meta